package com.ctw.mapmycity.spring;

import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class HBaseContextFactory {

	private static AbstractApplicationContext context;
	
	public static AbstractApplicationContext getContext(){
		
		if (context == null) {
			context = new ClassPathXmlApplicationContext(
					"/META-INF/spring/application-context.xml", AbstractApplicationContext.class);
			context.registerShutdownHook();
		}
		
		return context;
	}
}
